[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
##############################################################################
###+------------------+#######################################################
#+-| DAYS_BTW_DATES() |--------------------------------+######################
#| +------------------+ Returns number of days between |######################
#| start_date and end_date |######################
#+-----------------------------------------------------+######################
##############################################################################
##############################################################################
#+--| Summary |--------------+################################################
#| #INCLUDE date.hdr |################################################
#+---------------------------+################################################
##############################################################################
##############################################################################
#+--| Syntax |-----------------------------------------------------+##########
#| FUNCTION LONG days_btw_dates PROTOTYPE |##########
#| PARAMETERS VALUE DATE start_date, VALUE DATE end_date |##########
#+-----------------------------------------------------------------+##########
##############################################################################
##############################################################################
##############+---| Description |------------------------------+##############
##############| The days_btw_dates function returns the number |##############
##############| of days between start_date and end_date. |##############
##############+------------------------------------------------+##############
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * See if an employee performance review is due |#########
#########| * during this pay period. |#########
#########| |#########
#########| IF days_btw_dates( employ->start, today() )>180 |#########
#########| ? "Schedule review for " + employ->name |#########
#########| ENDIF |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| * How many days between today and the shuttle |#########
#########| * launch date? |#########
#########| |#########
#########| ? days_btw_dates( today(), launch_date ) |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 3 |-------------------------------------------+#########
#########| * What is the average number of days between |#########
#########| * patient's visits? |#########
#########| |#########
#########| !p SUM day_btw_dates( p->prior,p->last) TO total |#########
#########| ? total / a_reccount( p ) |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also:
cdow()
cmonth()
ctod()
day()
days_from()
dow()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson